package com.fqgj.xjd.user.client.enums;

/**
 * Created with IntelliJ IDEA.
 * User: sm
 * Date: 2017/3/14
 * Time: 下午7:49
 */
public enum UserCarrierTypeEnum {
    CARRIER_51(1, "51"),
    CARRIER_TONGDUN(2, "同盾"),
    CARRIER_WECASH(3, "闪银"),
    RONG_360(9, "融360");

    private Integer type;

    private String desc;

    UserCarrierTypeEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public Integer getType() {
        return type;
    }

    public UserCarrierTypeEnum setType(Integer type) {
        this.type = type;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public UserCarrierTypeEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public static UserCarrierTypeEnum getEnumByType(Integer type) {
        UserCarrierTypeEnum carrierTypeEnum = null;
        for (UserCarrierTypeEnum e : UserCarrierTypeEnum.values()) {
            if (e.getType().equals(type)) {
                carrierTypeEnum = e;
            }
        }
        return carrierTypeEnum;
    }
}
